home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 February / 1986-02.d64 / demo 1 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  54 lines

  1. 99 ifa=0thena=1:load"blinkobj",8,1
  2. 100 rem poke56,28:poke55,0:clr for vic, poke56,60:poke55,0:clr for +4/16
  3. 110 v1=785:v2=786:co=646:hi=192:rem for +4/16, v1=1281:v2=1282:co=1339:hi=60
  4. 120 rem for vic v1=1:v2=2:co=646:hi=28
  5. 130 pokev1,0:pokev2,hi
  6. 140 rem ** usr() is at $c000, $3c00 on the +4/16, $1c00 for vic **
  7. 150 sd=16384: rem ** set delay flag
  8. 160 db=8192 : rem ** disable blink
  9. 170 eb=4096 : rem ** enable blink
  10. 180 sb=2048 : rem ** stop color from blinking
  11. 190 mb=1024 : rem ** make color start blinking
  12. 200 vb=512  : rem ** return value of blinking color
  13. 210 rc=256  : rem ** reset all colors-no blinking
  14. 220 rem *** now we demonstrate blink
  15. 230 rd$="[221][144]**** red ****[221]":gr$="[221][144]*** green ***[221]":print"[147]"
  16. 240 poke 53281,0:poke 53280,0:rem make background black
  17. 250 rem color 0,1,7:color 4,1,7 for +4/16 in line 240
  18. 260 rem poke36879,8 for vic in line 240
  19. 270 x=usr(eb):if x=0 then530: rem ** enable blinkmode
  20. 280 c$=rd$
  21. 290 gosub450
  22. 300 x=usr(mb+(16*2)+0):rem ** black blinks to red
  23. 310 x=usr(mb+(16*3)+1):rem * white blinks to cyan
  24. 320 x=usr(mb+(16*7)+4):rem ** make purple blink to yellow
  25. 330 x=usr(sd+14): rem ** set blink speed
  26. 340 print:print"[156]   *** warning *** "
  27. 350 print:print"hit a key to change"
  28. 360 gosub530
  29. 370 x=usr(sb+0):rem **  stop black from blinking to red
  30. 380 x=usr(vb+0):if x<>0 then380:rem ** wait until black reset
  31. 390 x=usr(mb+(16*5)+0):rem ** now blink black to green
  32. 400 c$=gr$:gosub450
  33. 410 gosub530
  34. 420 x=usr(sb+0):rem **  stop black from blinking to green
  35. 430 x=usr(vb+0):if x<>0 then430:rem ** wait until black reset
  36. 440 goto280
  37. 450 print"attention - attention":print
  38. 460 print"[144]   condition  code "
  39. 470 print"   [213][192][192][192][192][192][192][192][192][192][192][192][192][192][201] "
  40. 480 print"   [221]             [221] "
  41. 490 print"   "c$
  42. 500 print"   [221]             [221] "
  43. 510 print"   [202][192][192][192][192][192][192][192][192][192][192][192][192][192][203] "
  44. 520 return
  45. 530 tx=10:ty=20
  46. 540 get a$:ty=ty-1:if ty<0 then ty=20:x=usr(sd+tx):tx=tx-1:if tx=0 then tx=1
  47. 550 ct$=" ":if tx/2=int(tx/2)then ct$="[209]"
  48. 560 print""
  49. 570 x=usr(vb+0):rem ** now find the color black is blinking to
  50. 580 pokeco,x:rem ** change current character color to blinking color
  51. 590 printtab(ty);ct$;
  52. 600 if a$="" then540
  53. 610 x=usr(sd+14):return
  54.